﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebApplication2.Models;

namespace WebApplication2.Controllers
{
    public class CourseController : Controller
    {
        // GET: Course
        public ActionResult Index()
        {
            var context = new SchoolEntities();

            var result = context.Courses.ToList();

            ViewBag.coures = result;

            return View();
        }
    }
}